const EB_FOR_UPDATE = 2;
const EB_RANGE_ONLY = 4;
- function Block( $address = '', $user = '', $by = 0, $reason = '',
+ function Block( $address = '', $user = 0, $by = 0, $reason = '',
$timestamp = '' , $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0 )
{
$this->mId = 0;
$dbw =& wfGetDB( DB_MASTER );
$dbw->begin();
+ # Unset ipb_anon_only and ipb_create_account for user blocks, makes no sense
+ if ( $this->mUser ) {
+ $this->mAnonOnly = 0;
+ $this->mCreateAccount = 0;
+ }
+
# Don't collide with expired blocks
Block::purgeExpired();